package com.ziyun.erp.modules.order.service.impl;

import com.ziyun.erp.modules.order.vo.OriginalRelevanceVo;
import org.springframework.stereotype.Service;

import java.util.List;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.ziyun.erp.modules.order.dao.ErpOrderAllotRelevanceDao;
import com.ziyun.erp.modules.order.entity.ErpOrderAllotRelevanceEntity;
import com.ziyun.erp.modules.order.service.ErpOrderAllotRelevanceService;

@Service("erpOrderAllotRelevanceService")
public class ErpOrderAllotRelevanceServiceImpl extends ServiceImpl<ErpOrderAllotRelevanceDao, ErpOrderAllotRelevanceEntity> implements ErpOrderAllotRelevanceService {

    @Override
    public boolean cancleAllotInfo(Integer productionId) {
        int update = this.baseMapper.cancleAllotInfo(productionId);
        if (update > 0){
            return true;
        }
        return false;
    }

    @Override
    public ErpOrderAllotRelevanceEntity getByProductionId(Integer productionId) {
        return this.baseMapper.getByProductionId(productionId);
    }

    @Override
    public List<OriginalRelevanceVo> selectInfoByOriginalOrderNo(String orderId) {
        return this.baseMapper.selectInfoByOriginalOrderNo(orderId);
    }
}
